<template>
    <section class="newslist">
        <ul class="mui-table-view">
            <li class="mui-table-view-cell mui-media"
            v-for="item in newlist" :key="item.id"
            >
                <router-link :to="'/home/newsInfo/'+item.id">
                    <img class="mui-media-object mui-pull-left" src="../../img/one.jpg">
                    <div class="mui-media-body">
                        <h4>{{item.title}}</h4>
                        <p class='mui-ellipsis'>
                            <span>发表时间:
                       <i>{{item.add_time | dataFormat}}</i>
                            </span>
                            <span class="text-right">{{item.click}}</span>
                        </p>
                    </div>
                </router-link>
            </li>

        </ul>
    </section>
</template>

<script>
  export default {
    data() {
      return {
        newlist:[
          {
            id:1,
            title:"1年一度的春季",
            add_time:new Date(),
            zhaiyao:"房产证 结婚证",
            click:1,
          },
          {
            id:2,
            title:"1年一度的春季",
            add_time:new Date(),
            zhaiyao:"房产证 结婚证",
            click:1,
          },
          {
            id:3,
            title:"1年一度的春季",
            add_time:new Date(),
            zhaiyao:"房产证 结婚证",
            click:1,
          },
          {
            id:4,
            title:"1年一度的春季",
            add_time:new Date(),
            zhaiyao:"房产证 结婚证",
            click:1,
          },
          {
            id:5,
            title:"1年一度的春季",
            add_time:new Date(),
            zhaiyao:"房产证 结婚证",
            click:1,
          },
          {
            id:6,
            title:"1年一度的春季",
            add_time:new Date(),
            zhaiyao:"房产证 结婚证",
            click:1,
          },
          {
            id:Date.now(),
            title:"1年一度的春季",
            add_time:new Date(),
            zhaiyao:"房产证 结婚证",
            click:1,
          },
          {
            id:Date.now(),
            title:"1年一度的春季",
            add_time:new Date(),
            zhaiyao:"房产证 结婚证",
            click:1,
          },
          {
            id:Date.now(),
            title:"1年一度的春季",
            add_time:new Date(),
            zhaiyao:"房产证 结婚证",
            click:1,
          },
          {
            id:Date.now(),
            title:"1年一度的春季",
            add_time:new Date(),
            zhaiyao:"房产证 结婚证",
            click:1,
          },
          {
            id:Date.now(),
            title:"1年一度的春季",
            add_time:new Date(),
            zhaiyao:"房产证 结婚证",
            click:1,
          },
          {
            id:Date.now(),
            title:"1年一度的春季",
            add_time:new Date(),
            zhaiyao:"房产证 结婚证",
            click:1,
          },
        ]
      }
    }
  }
</script>

<style scoped lang="scss">
    a {
        text-decoration: none;
    }
    .newslist {
        padding-bottom: 50px;
    }
    .mui-table-view-cell {
        p {
            display: flex;
            justify-content: space-between;
        }
    }
</style>